<template>
	<view class="fyneeditem">
		<view class="need-box">
			<view class="need-list-box" @click="toDetail()">
				<view class="need-list-box_title">
					<text class="top">置顶</text><text>车商同行{{needInfo.encry}}求购</text>
					<!-- <text v-if="needInfo.istop=='1'" class="top">置顶</text><text>车商同行{{needInfo.encry}}求购</text> -->
				</view>
				<view>
					<view class="margin-tb-xs"><uv-text :text="needInfo.brand" :size="16"></uv-text></view>
					<uv-text :size="14" :text="`车源地要求：${ needInfo.location}`"></uv-text>
				</view>
				<view class="need-list-box_other">
					<uv-text :text="needInfo.other" :size="13" type="info" :lines="2"></uv-text>
				</view>
				<uv-line /> 
				<view class="need-list-box_foot">
					<view class="time">
						<text> {{needInfo.time}} 发布</text>
					</view>
					<view class="phone">
						<text>电话联系</text>
					</view>
				</view> 
			</view>
		</view>
		<slot name="edit"></slot>
	</view>

</template>

<script>
	export default {
		name: "fy-need-item",
		props: {
			needInfo: { type: Object }
		},
		data() {
			return {

			};
		},
		methods: {
			toDetail() {
				var parm =`userid=${this.needInfo.userid}&needid=${this.needInfo.id}`
				uni.navigateTo({
					url: '/pages/needbuy/detail?' +parm
				})
			},
		}
	}
</script>

<style lang="scss">
	.top { 
		color: #fff;
		background-color: #ff3600;
		font-size: 24upx;
		padding: 4upx 10upx;
		border-radius: 8upx 0 8upx 0;
		margin-right: 10upx;
	}
</style>